About Our Examples

The Java Tutorial contains hundreds of complete working examples. Some of our examples are applets, others are standalone applications.

This page contains four sections that discuss various aspects of our examples:

Example Directory Names

Each lesson in the tutorial contains one or more programming examples, each of which can be composed of one or more files. A lesson groups its examples in sub-directories according to the version of the Java 2 SDK required and whether Swing is required.

A lesson might have one or more of the following example directories (from most up-to-date to least):

Example Directory Name Java 2 SDK Release/Version Other libraries
ex5 Java 2 SDK 5.0  
example-1dot4 Java 2 SDK 1.4  
example-1dot3 Java 2 SDK 1.3  
example-1dot2 Java 2 SDK 1.2  
example-swing JDK 1.1 JFC/Swing 1.1
example-1dot1 JDK 1.1  
example JDK 1.0.2  

Multiple Versions of the Same Program

Often, you can find multiple versions of the same program by looking in each of the example directories in a lesson. For example, you might find a JDK 1.0.2 version of a program in example and a JDK 1.1 version of the same program in example-1dot1.

We provide multiple versions of the same program for several reasons: